<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
    const shopCartList = [
        {
          cartInfoList: [
            {
              skuNum: 1,
              skuPrice: 1299,
            },
            {
              skuNum: 3,
              skuPrice: 777,
            },
            {
              skuNum: 2,
              skuPrice: 900,
            },
          ],
        },

        {
          cartInfoList: [
            {
              skuNum: 2,
              skuPrice: 420,
            },
            {
              skuNum: 4,
              skuPrice: 99,
            },
          ],
        },
      ];

    const re =  shopCartList.reduce((prev1,item1)=>{
         const item1re = item1.cartInfoList.reduce((prev2,item2)=>{
                prev2 = prev2+item2.skuNum
                return prev2
            },0)
        return item1re+prev1
    },0)
    console.log(re)
    </script>
  

</body>
</html>